/**
 * 
 */
package co.edu.javeriana.ga.test.magicsquare;

import org.jgap.Configuration;
import org.jgap.Gene;
import org.jgap.InvalidConfigurationException;
import org.jgap.impl.IntegerGene;

/**
 * <p>
 * Class of Utility for Magic Cuadrant
 * </p>
 * 
 * @author <a href="f.triana@javeriana.edu.co">Alejandro Triana</a>
 * @version 1.0
 * 
 */
public class MAGaUtil {

	/**
	 * <p>
	 * Create the Fenotype. The Fenotype is composed by an array of {@link Gene}
	 * . Gene represent a cell of squeare with values between 1 and
	 * <code>size</code>
	 * </p>
	 */
	static Gene[] createFenotype(Configuration configuration, Integer size)
			throws InvalidConfigurationException {

		Gene[] gen = new Gene[size * size];

		for (int i = 0; i < gen.length; i++) {
			gen[i] = new IntegerGene(configuration, 1, size * size);
			
		}
		return gen;

	}

}
